Skip to content

Conversation

@rljacob
Copy link
Member

@rljacob rljacob commented Oct 13, 2025

No description provided.

rljacob and others added 29 commits October 3, 2025 16:03
Remove setting of xao Av. Loop bound is no longer
set by MCT and debugger was complaining.
Use correct temporary array sizes for ice and ocean instead of the maximum.
Requires one more temp array.  Also use a logical to allocate them just once.
need to add ext tags
fix data atm too
for _ext tags, we need more methods to retrieve data
Or maybe we will go back to dual mesh, and then dual mesh will be like
any other FV mesh on coupler side
the _ext tags use about twice as much memory
while the dual mesh would be more optimal
they are a relic from the past
we were supporting atm spectral to ocean projection, using tempestremap

moved to pg2 mesh, so spectral will be used only in monogrid scenarions
there should be no mapping in spectral cases (ne4np4, for exanple)
All grids are related to atm np4 gll points; either dual mesh, or culled
dual mesh on coupler side (land)

atm will be on coupler side just point cloud (migrated from comp side,
directly)
it may be left 0 for spectral case;
no maps, so no aream to read from anywhere
in general, aream for lnd is projected from atm
in same grid cases, spectral (monogrid), do not need to
project anymore
atm will be type 2 on coupler side, when atm_pg_active is false
it cannot be used for any map read or compute, it can be
only monogrid case

there are still differences shown with MOABCOMP, so something is still
not right
the utilities in shr_moab_mod.F90 need to know if spectral atm
is involved; then, instead of cells, use vertices nb and tags
the only coupler instance that uses vertices for primary data
is the atm in spectral case

anoter fix needed is for regular pg2 case; not working anymore
spectral mesh will not be instanced at all for
pure spectral; it is not used at all right now
only in the pgx case the spectral mesh is instanced
and that is just because it is easier to instance all meshes,
not just pgx FV mesh
maybe it should be cleaned out completely
when writing history files, the global size needs to be
the number of global vertices, for spectral case (  atm_pg_active false)
ngv is the number of global vertices for the imoab app
it is used only for spectral case
the other calls iMOAB_GetGlobalInfo need the number of cells,
 not the number of vertices
introduce mb_scm_land logical
it is false, except when land is identified as scm
(lnd_nx and lnd_ny are both 1)
it is turn on if needed in lnd moab cx init
it will trigger land migrate of PC cloud, not a read from domain file
also, Sa2l map will involve type vertex for land
history and restart for land still have to be fixed
problem appeared for conus, debug mode case:
SMS_D_Ln5.conusx4v1pg2_r05_IcoswISC30E3r5.F2010.chrysalis_gnu

euler formula assumes there is only one connected region,
when number of edges is computed
HSFC does not guarantee that, especially for RRM meshes

select arbitrarily 3 as more connected regions could be possible
we could actually allocate much more, nedges_c to be number of quads * 4

Also, when skip match needs to be checked first, before mapid
triggered in debug mode only
matrices o2x_am, used for atm merge, should not be retrieved
if ocean is not active

similar for ice, and xao fluxes
Ops involving a2x_rm in prep_rof_mrg_moab should only happen
when rof_heat is true.
Add areafact_samegrid to component_init_areacor_moab and when
its true, set the area correction factors to 1.  As done in driver-mct.
Add more handling of single column mode for land.
Also check for single column model when land mb id
is passed in and set ent_type appropriately.
In single_column case, zero out Si_snowh to match
eam history with driver-mct
Set ent_type correctly for scm land
Set ent_type correctly with land is in single column mode
for section that zeros river variables.
Use single_column and scm_multcol to determine if
mb_scm_land should be set.  DP case will not have
land_nx=land_ny=1
Set mbGridType to 0 for mlnid.  Some code was moved for the scm case
which broke the calculation that was here.
Make sure areas are initialized in areacor by
moving the iMOAB_GetDouble call that does it outside
of the if(.not.samegrid) block.  aream is needed
later.
xao_am, l2x_am, i2x_am, and o2x_am are only set using GetDouble if
the corresponding model is present.  For at least o2x_am, it was
still used in a merge even if not present.  So 0 those arrays
if the corresponding moab app id is not set.

This zero's the Faoo_h2otemp field for the moab coupler.
'Fall_' fluxes that are not merged have to be set to 0 in MOAB
when there's no land model.  Otherwise they will keep the default value.
Found while testing the aquaplanet case and dust fluxes were -1e+10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants